﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Microsoft.Forums.SyncService
{
    /// <summary>
    /// The result of an asynchronous Forum Synchronization
    /// </summary>
    public class SynchronizeForumCompletedEventArgs : AsyncCompletedEventArgs
    {
        /// <summary>
        /// Constructs the Completed event args
        /// </summary>
        /// <param name="forumId">The forum id.</param>
        /// <param name="forumSummary">The forum summary.</param>
        /// <param name="exception">The exception.</param>
        /// <param name="canceled">Was this sync canceled?</param>
        /// <param name="state">The state we use to organize synchronization</param>
        public SynchronizeForumCompletedEventArgs(
            Guid forumId,
            SynchronizeForumSummary forumSummary,
            Exception exception, 
            bool canceled, 
            object state)
            : base(exception, canceled, state)
        {
            SynchronizeForumSummary = forumSummary;
            ForumId = forumId;
        }

        /// <summary>
        /// Gets the forum id.
        /// </summary>
        /// <value>The forum id.</value>
        public Guid ForumId
        {
            get;
            private set;
        }

        /// <summary>
        /// TThe summary of what was synchronized
        /// </summary>
        public SynchronizeForumSummary SynchronizeForumSummary
        {
            get;
            set;
        }
    }
}
